package com.gouzaofangfa;

import java.util.Scanner;

public class StudentScannerTesst {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("输入学生的姓名");
        String studentName = sc.next();
        System.out.println("输入学生的年龄");
        int studentAge = sc.nextInt();
        System.out.println("输入学生的班级号");
        String classNum = sc.next();
        StudentScanner studentScanner = new StudentScanner(studentName, studentAge ,classNum);
        System.out.println(studentScanner.getName());
        System.out.println(studentScanner.getAge());
        System.out.println(studentScanner.getClassNum());
        System.out.println(studentScanner.toString());
    }
}
